<template>
    <Homeheader />
    <div id="help">
        <div id="help-header"> 
            <span class="iconfont icon-fanhui1"></span>
            <span class="span1">
                帮助
            </span>
        </div>
        <div id="help-content">
            <div id="left1">
                <ul>
                    <li :class="flag == 1 ? 'li1' : 'li'" @click="upflag(1)">帮助中心</li>
                    <li :class="flag == 2 ? 'li1' : 'li'" @click="upflag(2)">隐私策略</li>
                    <li :class="flag == 3 ? 'li1' : 'li'" @click="upflag(3)">应用信息</li>
                </ul>
            </div>
            <div id="content-right">
                <RouterView />
            </div>
        </div>
    </div>
</template>
<script setup lang="ts">
import Homeheader from '../../views/pages/Homeheader.vue';
import { ref } from 'vue';
import { useRouter } from 'vue-router';
let router = useRouter()
// 左侧按钮切换
let flag = ref(1)
let upflag = (num: number) => {
    flag.value = num
    if (num == 1) {
        router.push('/help/help_info')
    } else if (num == 2) {
        router.push('/help/help_privacy')
    } else if (num == 3) {
        router.push('/help/help_use')
    }
}

</script>
<style lang="less" scoped>
#help {
    padding-top: 10vh;
    width: 100%;
    min-height: 100vh;
    background-color: #E5E5E5;
    box-sizing: border-box;

    #help-header {
        width: 90%;
        margin: 0 auto; 
        height: 10vh;
        display: flex;
        align-items: center;
        .iconfont{
            font-size: 4vh;
        }
        .span1{
            font-size: 3vh;
            font-weight: 600;
            margin-left: 2vh;
        }
    }

    #help-content {
        width: 90%;
        margin: 0 auto;
        min-height: 80vh;
        display: flex;
        flex-direction: row;
        justify-content: space-between;

        #left1 {
            width: 30%;
            height: 25vh;
            background-color: #fff;
            border-radius: 2vh;

            ul {
                padding: 0;
                display: flex;
                flex-direction: column;
                justify-content: space-between;
                height: 100%;
                padding: 2vh 0;
                box-sizing: border-box;

                .li {
                    list-style: none;
                    height: 6vh;
                    line-height: 6vh;
                    border-radius: 1vh;
                    margin: 0 2vh;
                    box-sizing: border-box;
                }

                .li1 {
                    list-style: none;
                    height: 6vh;
                    line-height: 6vh;
                    background-color: #F0F8FF;
                    color: #025CCA;
                    border-radius: 1vh;
                    margin: 0 2vh;
                    box-sizing: border-box;
                }
            }
        }

        #content-right {
            width: 69%;
            height: 100%;
        }
    }
}
</style>